/**
 * OA项目辅助模块配置入口
 */

// 导入全局配置
const globalHelpers = require('../../../../helpers/index.js');

// 尝试导入项目特定辅助模块
let projectPageHelper = null;
let projectCloudHelper = null;
let projectTimeHelper = null;

try {
  projectPageHelper = require('../helpers/page_helper.js');
} catch (e) { /* 项目未定义此助手，使用全局 */ }

try {
  projectCloudHelper = require('../helpers/cloud_helper.js');
} catch (e) { /* 项目未定义此助手，使用全局 */ }

try {
  projectTimeHelper = require('../helpers/time_helper.js');
} catch (e) { /* 项目未定义此助手，使用全局 */ }

// 导出模块，优先使用项目特定模块，若无则使用全局模块
module.exports = {
  pageHelper: projectPageHelper || globalHelpers.pageHelper,
  cloudHelper: projectCloudHelper || globalHelpers.cloudHelper,
  timeHelper: projectTimeHelper || globalHelpers.timeHelper,
  validateHelper: globalHelpers.validateHelper,
  dataHelper: globalHelpers.dataHelper,
  fileHelper: globalHelpers.fileHelper,
  formHelper: globalHelpers.formHelper,
  helper: globalHelpers.helper,
  testHelper: globalHelpers.testHelper
};